<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<title>用户首页</title>
</head>

<body>
</body>
<script>



var jsonstr = "roleId=27";
$.ajax({
	type: "post",
	datatype: 'json',
	contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
	url: 'http://120.27.192.10/alfa-mobile-ws/rest/OpenId/findlist?mobiletoken=42ea10b0cb064fa5a8c0e7ff442f30af',
	data: jsonstr,
	success: function(data) {
		alert(JSON.stringify( data.rows))
		 $.each( data.rows, function(index, content){
			 var d = new Date()
			 var vYear = d.getFullYear()
			 var vMon = d.getMonth() + 1
			 var vDay = d.getDate()
			 var h = d.getHours(); 
			 var m = d.getMinutes(); 
			 s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+"-"+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
				var json2={"openid":""+content.openid+"","time":""+s+"","name":""+getCookie("realname")+""}
				$.ajax({
					cache: false,
					type: "post",
					datatype: 'json',
					contentType: 'application/json;charset=UTF-8',
					url: 'http://mvc.tunnel.qydev.com/weixin_aef/recycle/TextToAdmin',
					data: JSON.stringify(json2),
					success: function(data) {
						if(data.errcode=="0"){
							toast.hide();
							location.reload();
						}
					}
				})
		 });
	}
})



	var jsonstr = "roleId=27";
	$.ajax({
		cache: false,
		type: "post",
		datatype: 'json',
		contentType: 'application/json;charset=UTF-8',
		data: jsonstr,
		url: 'http://120.27.192.10/alfa-mobile-ws/rest/OpenId/findlist?mobiletoken=42ea10b0cb064fa5a8c0e7ff442f30af',
		success: function(data) {
			 $.each( data.rows, function(index, content){
				 var d = new Date()
				 var vYear = d.getFullYear()
				 var vMon = d.getMonth() + 1
				 var vDay = d.getDate()
				 var h = d.getHours(); 
				 var m = d.getMinutes(); 
				  s=vYear+"-"+(vMon<10 ? "0" + vMon : vMon)+"-"+(vDay<10 ? "0"+ vDay : vDay)+"-"+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m);
					var json2={"openid":""+content.openid+"","time":""+s+"","name":""+getCookie("realname")+""}
					$.ajax({
						cache: false,
						type: "post",
						datatype: 'json',
						contentType: 'application/json;charset=UTF-8',
						url: 'http://mvc.tunnel.qydev.com/weixin_aef/recycle/TextToAdmin',
						data: JSON.stringify(json2),
						success: function(data) {
							if(data.errcode=="0"){
								toast.hide();
								location.reload();
							}
						}
					})
			 })
			 }
		})

 	</script>

</html>